//
//  UIApplication+AG.swift
//  ASW
//
//  Created by zhuxuhong on 2020/12/8.
//

import UIKit

extension UIApplication {
    public enum PlistInfo: String {
        case version = "CFBundleShortVersionString"
        case buildVersion = "CFBundleVersion"
        case bundleId = "CFBundleIdentifier"
        case displayName = "CFBundleDisplayName"
        
        var value: Any? {
            return Bundle.main.object(forInfoDictionaryKey: rawValue)
        }
    }
    public func info<T>(_ info: PlistInfo) -> T? {
        return info.value as? T
    }
}
